import { Route, Link } from 'react-router-dom';
import {InfoManage} from "../../component/Manage/InfoManage";
import {Sign} from '../../component/User/Sign';
import {UploadPicture} from '../../component/User/UploadPicture';
import { Menu } from "antd";
import {
    SearchOutlined,
    FileOutlined,
    UserOutlined,
} from '@ant-design/icons';
import ManageSystem from "../../component/Manage/ManagerSystem";
import InfoVisual from "../../component/Manage/InfoVisual";


const manage = [
    {
        path: '/ManagePage/Information',
        component: InfoManage,
        title: '考生信息详情',
        icon:<UserOutlined/>
    }, {
        path: '/ManagePage/ManageSystem',
        component: ManageSystem,
        title: '考试信息管理系统',
        icon:<FileOutlined/>
    },
    {
        path: '/ManagePage/InfoVisual',
        component: InfoVisual,
        title: '成绩可视化',
        icon:<SearchOutlined/>

    }
]

const manageRoutes = () => {
    return manage.map(({ path, component }, i) => {
        return <Route key={i} path={path} component={component} />

    })
}

const manageMenu = () => {
    return manage.map(({ path, title,icon }, i) => {

        return (
            <Menu.Item key={title} icon={icon}>
                <Link key={title} to={path}>{title}</Link>
            </Menu.Item>
        )
    })
}



export { manageRoutes, manageMenu }